﻿package {
	
	import flash.display.Sprite;
	
	import org.neelts.web.vkontakte.*;
	
	public class Example extends Sprite {
		
		
		private var connector:APIConnector;
		
		private var vars:Object;
		
		public function Example() {
			
			vars = API.readVars(root);
			
			/**
			 * 
			 * Type your application ID, SECRET and USER_ID
			 * 
			 */
			
			connector = new APIConnector(vars, "APP_ID_NUMBER", "APP_SECRET", "YOUR_ID");
			
			connector.request(API.GET_SERVER_TIME, null, onTimeReceived);
			
		}
		
		private function onTimeReceived(e:APIEvent):void {
			trace(e.message);
		}
		
	}

}